package com.falm.picturebackend.entity.DO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

/**
 * 文件/文件夹核心信息表
 * @TableName files
 */
@TableName(value ="files")
public class FilesDO {
    /**
     * 自增内部主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 全局唯一标识符用于关联
     */
    private String uuid;

    /**
     * 文件或文件夹名称
     */
    private String name;

    /**
     * 是否为文件夹(0:文件, 1:文件夹)
     */
    private Integer isFolder;

    /**
     * 父文件夹UUID(根目录为空字符串)
     */
    private String parentUuid;

    /**
     * 文件大小(字节)
     */
    private Long fileSize;

    /**
     * 文件扩展名
     */
    private String fileExtension;

    /**
     * MIME类型
     */
    private String mimeType;

    /**
     * 文件存储路径
     */
    private String storagePath;

    /**
     * 存储类型
     */
    private Object storageType;

    /**
     * 文件状态
     */
    private Object status;

    /**
     * 层级深度(从0开始)
     */
    private Integer level;

    /**
     * 完整路径
     */
    private String fullPath;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 自增内部主键
     */
    public Long getId() {
        return id;
    }

    /**
     * 自增内部主键
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 全局唯一标识符用于关联
     */
    public String getUuid() {
        return uuid;
    }

    /**
     * 全局唯一标识符用于关联
     */
    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    /**
     * 文件或文件夹名称
     */
    public String getName() {
        return name;
    }

    /**
     * 文件或文件夹名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 是否为文件夹(0:文件, 1:文件夹)
     */
    public Integer getIsFolder() {
        return isFolder;
    }

    /**
     * 是否为文件夹(0:文件, 1:文件夹)
     */
    public void setIsFolder(Integer isFolder) {
        this.isFolder = isFolder;
    }

    /**
     * 父文件夹UUID(根目录为空字符串)
     */
    public String getParentUuid() {
        return parentUuid;
    }

    /**
     * 父文件夹UUID(根目录为空字符串)
     */
    public void setParentUuid(String parentUuid) {
        this.parentUuid = parentUuid;
    }

    /**
     * 文件大小(字节)
     */
    public Long getFileSize() {
        return fileSize;
    }

    /**
     * 文件大小(字节)
     */
    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    /**
     * 文件扩展名
     */
    public String getFileExtension() {
        return fileExtension;
    }

    /**
     * 文件扩展名
     */
    public void setFileExtension(String fileExtension) {
        this.fileExtension = fileExtension;
    }

    /**
     * MIME类型
     */
    public String getMimeType() {
        return mimeType;
    }

    /**
     * MIME类型
     */
    public void setMimeType(String mimeType) {
        this.mimeType = mimeType;
    }

    /**
     * 文件存储路径
     */
    public String getStoragePath() {
        return storagePath;
    }

    /**
     * 文件存储路径
     */
    public void setStoragePath(String storagePath) {
        this.storagePath = storagePath;
    }

    /**
     * 存储类型
     */
    public Object getStorageType() {
        return storageType;
    }

    /**
     * 存储类型
     */
    public void setStorageType(Object storageType) {
        this.storageType = storageType;
    }

    /**
     * 文件状态
     */
    public Object getStatus() {
        return status;
    }

    /**
     * 文件状态
     */
    public void setStatus(Object status) {
        this.status = status;
    }

    /**
     * 层级深度(从0开始)
     */
    public Integer getLevel() {
        return level;
    }

    /**
     * 层级深度(从0开始)
     */
    public void setLevel(Integer level) {
        this.level = level;
    }

    /**
     * 完整路径
     */
    public String getFullPath() {
        return fullPath;
    }

    /**
     * 完整路径
     */
    public void setFullPath(String fullPath) {
        this.fullPath = fullPath;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FilesDO other = (FilesDO) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUuid() == null ? other.getUuid() == null : this.getUuid().equals(other.getUuid()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getIsFolder() == null ? other.getIsFolder() == null : this.getIsFolder().equals(other.getIsFolder()))
            && (this.getParentUuid() == null ? other.getParentUuid() == null : this.getParentUuid().equals(other.getParentUuid()))
            && (this.getFileSize() == null ? other.getFileSize() == null : this.getFileSize().equals(other.getFileSize()))
            && (this.getFileExtension() == null ? other.getFileExtension() == null : this.getFileExtension().equals(other.getFileExtension()))
            && (this.getMimeType() == null ? other.getMimeType() == null : this.getMimeType().equals(other.getMimeType()))
            && (this.getStoragePath() == null ? other.getStoragePath() == null : this.getStoragePath().equals(other.getStoragePath()))
            && (this.getStorageType() == null ? other.getStorageType() == null : this.getStorageType().equals(other.getStorageType()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
            && (this.getFullPath() == null ? other.getFullPath() == null : this.getFullPath().equals(other.getFullPath()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUuid() == null) ? 0 : getUuid().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getIsFolder() == null) ? 0 : getIsFolder().hashCode());
        result = prime * result + ((getParentUuid() == null) ? 0 : getParentUuid().hashCode());
        result = prime * result + ((getFileSize() == null) ? 0 : getFileSize().hashCode());
        result = prime * result + ((getFileExtension() == null) ? 0 : getFileExtension().hashCode());
        result = prime * result + ((getMimeType() == null) ? 0 : getMimeType().hashCode());
        result = prime * result + ((getStoragePath() == null) ? 0 : getStoragePath().hashCode());
        result = prime * result + ((getStorageType() == null) ? 0 : getStorageType().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getFullPath() == null) ? 0 : getFullPath().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", uuid=").append(uuid);
        sb.append(", name=").append(name);
        sb.append(", isFolder=").append(isFolder);
        sb.append(", parentUuid=").append(parentUuid);
        sb.append(", fileSize=").append(fileSize);
        sb.append(", fileExtension=").append(fileExtension);
        sb.append(", mimeType=").append(mimeType);
        sb.append(", storagePath=").append(storagePath);
        sb.append(", storageType=").append(storageType);
        sb.append(", status=").append(status);
        sb.append(", level=").append(level);
        sb.append(", fullPath=").append(fullPath);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }
}